<%@page import="java.util.Map" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="com.yjd.comm.util.ServletUtil" %>
<%@ page import="com.yjd.comm.util.FrameUtil" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/1/14
  Time: 15:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         isELIgnored="false" pageEncoding="UTF-8" %>
<html>
<head>
    <title></title>
    <style type="text/css">
        * {
            font-size: 14px;
        }

        div {
            line-height: 30px;
            margin: 0px 30px;
        }
    </style>
</head>
<body>
<%
    response.getWriter().write("<div>header：</div>");
    Map<String, Object> headerMap = FrameUtil.newLinkedHashMap();
    Enumeration<String> headerNames = request.getHeaderNames();
    while (headerNames.hasMoreElements()) {
        String key = headerNames.nextElement();
        headerMap.put(key, request.getHeader(key));
    }
    response.getWriter().write("<div><pre>" + FrameUtil.json(headerMap, true) + "</pre></div>");
    response.getWriter().write("<br/><br/><br/><br/>");
    response.getWriter().write("<div>ip地址为：" + ServletUtil.getIpAddr(request) + "<div>");
%>
</body>
</html>